}
static gchar *
-scale_format_value (GtkScale *scale, gdouble value)
+scale_format_value_blank (GtkScale *scale, gdouble value)
{
return g_strdup (" ");
}
+static gchar *
+scale_format_value (GtkScale *scale, gdouble value)
+{
+ return g_strdup_printf ("%0.*f", 1, value);
+}
+
static void
activate (GApplication *app)
{
gtk_builder_add_callback_symbol (builder, "decrease_icon_size", (GCallback)decrease_icon_size);
gtk_builder_add_callback_symbol (builder, "reset_icon_size", (GCallback)reset_icon_size);
gtk_builder_add_callback_symbol (builder, "scale_format_value", (GCallback)scale_format_value);
+ gtk_builder_add_callback_symbol (builder, "scale_format_value_blank", (GCallback)scale_format_value_blank);
gtk_builder_connect_signals (builder, NULL);
<property name="restrict_to_fill_level">0</property>
<property name="fill_level">75</property>
<property name="draw_value">1</property>
+ <property name="digits">-1</property>
+ <signal name="format-value" handler="scale_format_value"/>
</object>
</child>
<child>
<property name="restrict_to_fill_level">0</property>
<property name="fill_level">75</property>
<property name="draw_value">1</property>
- <signal name="format-value" handler="scale_format_value"/>
+ <property name="digits">-1</property>
+ <signal name="format-value" handler="scale_format_value_blank"/>
</object>
<packing>
<property name="position">1</property>